<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<meta name="decorator" content="sysDefault" />
<script type="text/javascript" src="${staticPath}/lib/jquery/1.10.2/jquery.js"></script>
<script type="text/javascript" src="${staticPath}/js/list.js"></script>
<script
	src="${staticPath}/lib/datetimepicker/0.0.11/js/bootstrap-datetimepicker.min.js"
	type="text/javascript"></script>
<script
	src="${staticPath}/lib/datetimepicker/0.0.11/js/locales/bootstrap-datetimepicker.zh-CN.js"
	type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
	$("#btnQuery").click(function(){
		$("#salesForm").submit();
	});
	$(".o-a-form-date").datetimepicker({
		language : 'zh-CN',
		autoclose : true,
		minView : 2,
		todayBtn : 1,
		pickerPosition : "bottom-left"
	});
});

function checkData(){
	if ($("#endDate").val().length !=0 && $("#startDate").val().length!=0) {
			if ($("#endDate").val() < $("#startDate").val()) {
				alert("结束日期小于开始日期,请重新选择日期！");
				return false;
			} else {
				return true;
			}
		}
      return  true;
	}
</script>

</head>
<body>
<form:form name="listForm"  modelAttribute="sysLogOrgSync" method="post" class="form-inline" role="form">					  
	<div class="container-fluid">
		<div class="row">
			<div class="col-xs-12">
				<div class="panel panel-default">
				  <div class="panel-heading">
					  <h3 class="panel-title">
						      HR同步日志
						  <a class="btn btn-default btn-sm pull-right" href="javascript:void(0)" onclick="history.go(-1)">返回</a>
					  </h3>
				  </div>	
				  <div class="f_2" style="margin:5px;">		  
					  <div class="form-group">
							<form:input path="type" id="type" class="form-control" placeholder="日志类型" />
					  </div>
					  <div class="form-group">
						    <form:input path="status" id="status" class="form-control" placeholder="操作状态" />
					  </div>
				  </div>  
				  <div class="f_2" style="margin:5px;" >
					  <div>
	           				<label style="font-size:13px;float:left;margin-top:7px;">创建时间：</label>
	                       	<div style="float:left;width:30%;margin-bottom:5px;" class="input-group date o-a-form-date" data-date="" data-date-format="yyyy-mm-dd">
							<input class="form-control" id="createTime" name="createTime"  value="<fmt:formatDate value="${sysLogOrgSync.createTime}" pattern="yyyy-MM-dd"/>" type="text" readonly/>
								<span class="input-group-addon"><i class="glyphicon glyphicon-remove"></i></span>
								<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
							</div>
				      </div>
				      <div style="width:55px;height:35px;float:left;margin-left:10px;"><button class="btn btn-primary" type="submit" onclick="return checkData()">查询</button></div>	    
			      </div>				  					 
				    <tags:message content="${message}" />
					<table class="table table-striped table-bordered table-hover">
						<thead>
						</thead>
						<thead>
							<tr>								
								<th>日志类型</th>
								<th>创建时间</th>
								<th>操作状态</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${page.list}" var="sysLogOrgSync">
								<tr>	
									<td>${sysLogOrgSync.type}</td>
									<td><fmt:formatDate value="${sysLogOrgSync.createTime}"
									pattern="yyyy-MM-dd HH:mm:ss" /></td>
									<td><ossp:value dictType="ORGSYNCSTATUS" key="${sysLogOrgSync.status}"></ossp:value></td>		
									<td>
										<a href="${contextPath}/sys/log/hr/${sysLogOrgSync.id}/view">查看</a>
										<a href="${contextPath}/sys/log/hr/${sysLogOrgSync.id}/remove"
										   onclick="return Oosp_Confirm('确认要删除该条数据吗？', this.href)">删除</a>
									</td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
				  <div class="panel-footer">
				  	<pager:pager pageSize="${page.pageSize}" pageNo="${page.pageNo}" url="" total="${page.total}"/>
				  </div>
				</div>			
			</div>
		</div>
	</div>
</form:form>
</body>
</html>